<form id="pagerForm" method="post" action="{:U(MODULE_NAME.'/'.CONTROLLER_NAME.'/'.ACTION_NAME)}">
	<input type="hidden" name="pageNum" value="{$currentPage|default='1'}" />
	<input type="hidden" name="numPerPage" value="{$numPerPage}" />
	<input type="hidden" name="_order" value="{$_REQUEST._order}"/>
	<input type="hidden" name="_sort" value="{$_REQUEST._sort}"/>
	<input type="hidden" name="search_where[goods_name][like]" value="{$_REQUEST.search_where.goods_name.like}"/>
	<!--
	<input type="hidden" name="search_where[xinghao][like]" value="{$_REQUEST.search_where.xinghao.like}"/>
	<input type="hidden" name="search_where[guige][like]" value="{$_REQUEST.search_where.guige.like}"/>
	-->
	<input type="hidden" name="search_where[depot_id][eq]" value="{$_REQUEST.search_where.depotname.eq}"/>
	<input type="hidden" name="search_where[supplier_id][eq]" value="{$_REQUEST.search_where.suppliername.eq}"/>	
</form>

<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return dwzSearch(this, 'dialog');" action="{:U(MODULE_NAME.'/'.CONTROLLER_NAME.'/'.ACTION_NAME)}" method="post">
		<div class="searchBar">
	        <table class="searchContent" style="margin:0 15;">
	            <tr>
	                <td>物料名称：</td>
	                <td>
	                   <input type="text" name="search_where[goods_name][like]" size="16" value="{$search_where.goods_name.like}" class="medium" >
	                </td>
	                <!--
	                <td>物料型号：</td>
	                <td>
	                   <input type="text" name="search_where[xinghao][like]" size="16" value="{$search_where.xinghao.like}" class="medium" >
	                </td>
	                <td>物料规格：</td>
	                <td>
	                   <input type="text" name="search_where[guige][like]" size="16" value="{$search_where.guige.like}" class="medium" >
	                </td>
	                -->
	               	<td>仓库：</td>
	                <td>
						<select class="combox" name="search_where[depot_id][eq]">
							<option value="">请选择</option>
							<foreach name='depot' item='v'>
								<option value="{$v['id']}" <eq name="Think.session.depot_id" value="$v['id']">selected=selected</eq>>{$v['name']}</option>
							</foreach>
						</select>
	                </td>
	                <td>供应商：</td>
	                <td  width="20%">
						<select class="combox" name="search_where[supplier_id][eq]">
							<option value="">请选择</option>
							<foreach name='supplier' item='v'>
								<option value="{$v['id']}" <eq name="_REQUEST.search_where.supplier_id.eq" value="$v['id']">selected=selected</eq>>{$v['name']}</option>
							</foreach>
						</select>
	                </td>
	                <td width="10%"></td>
	                <td align="right">
	                	<div class="buttonActive">
	                		<div class="buttonContent">
	                			<button type="submit">检索</button>
	                		</div>
	                	</div>
	                </td>
	            </tr>
	        </table>
		</div>
	</form>
</div>
	<div class="pageContent">
		<table class="table" layoutH="88" targetType="dialog" width="100%">
			<thead>
				<tr>
					<th width="80">查找带回</th>
					<th>编码</th>
					<th orderfield="goodsName">物料名称</th>
					<th orderfield="price">单价</th>
					<th>供应商</th>
					<th>库房</th>
				</tr>
			</thead>
			<tbody>
				<foreach name="list" item="v">
					<tr>				
						<td>
							<a class="btnSelect" href="javascript:$.bringBack({id:'{$v['code']}', name:'{$v['goods_name']}<if condition="$v['xinghao']">-{$v['xinghao']}</if><if condition="$v['guige']">-{$v['guige']}</if>',
							depot_name:'{$v['depot_name']}',
							supplier_name:'{$v['supplier_name']}',price:'{$v['price']}'})" title="查找带回">选择</a>
						</td>
						<td>{$v['code']}</td>
						<td>{$v['goods_name']}<if condition="$v['xinghao']">-{$v['xinghao']}</if><if condition="$v['guige']">-{$v['guige']}</if></td>
						<td>{$v['price']}</td>
						<td>{$v['supplier_name']}</td>
						<td>{$v['depot_name']}</td>
					</tr>
				</foreach>
			</tbody>
		</table>
	
		<div class="panelBar">
			<div class="pages">
				<span>显示</span>
				<select name="numPerPage" onchange="dwzPageBreak({$Think.config.TMPL_L_DELIM}targetType:'dialog', numPerPage:this.value{$Think.config.TMPL_R_DELIM})" >
					<option value="10" <if condition="$numPerPage eq 10">selected</if>>10</option>
					<option value="20" <if condition="$numPerPage eq 20">selected</if>>20</option>
					<option value="50" <if condition="$numPerPage eq 50">selected</if>>50</option>
					<option value="100" <if condition="$numPerPage eq 100">selected</if>>100</option>
				</select>
				<span>条，共{$totalCount}条</span>
			</div>

			<div class="pagination" targetType="dialog" totalCount="{$totalCount}" numPerPage="{$numPerPage}" pageNumShown="{$pageNumShown}" currentPage="{$currentPage}"></div>
		</div>
</div>